Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

239
Vistas
getting [Object object] instead of String in node.js request

I am having a slight issue here, I am working on a project (already built), but there's a slight issue in it, that is whenever I type a name or string that is not in the database and try to log it (after hitting send request button) using console.log(req.body.connection) or console.log(JSON.stringify(req.body.connection[0]), it prints this

  connection:
   '[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]'

instead of "xyz@gmail.com" or "someRandomString" (the string that I entered and hit the send request button).

You can see in this image that I am typing a random string sfsfsf and in payload it gives me that same [Object object] in connection property, it should be sfsfsf string in place of that. enter image description here Can someone tell me why is this? And how can I resolve this problem? I would really appreciate the help.

Edit: If seeing the code explains better, then here it is. Notice that I am getting connection : "[object Object]" as string. enter image description here

about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda